package cn.nawang.ebeim.api.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * @ClassName: StorageServer
 * @Description: TODO
 * @author fanyb
 * @date Aug 18, 2015 11:21:42 AM
 * @version v1.0
 */
@Entity
@Table(name = "storage_server", catalog = "ebeim")
public class StorageServer {
  private String id;
  private String host;
  private int port;
  private String storageCloudId;
  private String internalHost;
  private int internalPort;
  
  private String storageCloudName;
  
  public StorageServer(){
    
  }

  public StorageServer(String id, String host, int port, String storageCloudId, String internalHost,
      int internalPort, String storageCloudName) {
    super();
    this.id = id;
    this.host = host;
    this.port = port;
    this.storageCloudId = storageCloudId;
    this.internalHost = internalHost;
    this.internalPort = internalPort;
    this.storageCloudName = storageCloudName;
  }

  @Id
  @Column(name = "id", unique = true, nullable = false, length = 45)
  public String getId() {
    return id;
  }
  
  public void setId(String id) {
    this.id = id;
  }
  
  @Column(name = "host")
  public String getHost() {
    return host;
  }
  
  public void setHost(String host) {
    this.host = host;
  }
  
  @Column(name = "port")
  public int getPort() {
    return port;
  }
  
  public void setPort(int port) {
    this.port = port;
  }
  
  @Column(name = "storage_cloud_id")
  public String getStorageCloudId() {
    return storageCloudId;
  }
  
  public void setStorageCloudId(String storageCloudId) {
    this.storageCloudId = storageCloudId;
  }

  @Transient
  public String getStorageCloudName() {
    return storageCloudName;
  }

  public void setStorageCloudName(String storageCloudName) {
    this.storageCloudName = storageCloudName;
  }

  @Column(name = "internal_host")
  public String getInternalHost() {
    return internalHost;
  }

  public void setInternalHost(String internalHost) {
    this.internalHost = internalHost;
  }

  @Column(name = "internal_port")
  public int getInternalPort() {
    return internalPort;
  }

  public void setInternalPort(int internalPort) {
    this.internalPort = internalPort;
  }
  
  
  
}
